﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:params="clr-namespace:Elysium.Parameters"
                    xmlns:primitives="clr-namespace:Elysium.Controls.Primitives"
                    xmlns:controls="clr-namespace:Elysium.Controls">

    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="/Elysium;component/Themes/Buttons/CommandButtonBase.xaml"/>
    </ResourceDictionary.MergedDictionaries>

    <Style x:Key="{x:Type controls:ToggleCommandButton}" TargetType="{x:Type controls:ToggleCommandButton}" BasedOn="{StaticResource {x:Type primitives:CommandButtonBase}}">        
        <Style.Triggers>
            <Trigger Property="IsChecked" Value="True">
                <Setter Property="BorderBrush" Value="{StaticResource MiddleLightBrush}"/>
                <Setter Property="params:CommandButtons.Mask" Value="{StaticResource MiddleLightBrush}"/>
            </Trigger>
        </Style.Triggers>        
    </Style>
    
    <Style x:Key="ToggleCommandButtonApplicationBarStyle" TargetType="{x:Type controls:ToggleCommandButton}" BasedOn="{StaticResource CommandButtonBaseApplicationBarStyle}">
        <Style.Triggers>
            <Trigger Property="IsChecked" Value="True">
                <Setter Property="Background" Value="{StaticResource ContrastBrush}"/>
                <Setter Property="BorderBrush" Value="{StaticResource ContrastBrush}"/>
                <Setter Property="params:CommandButtons.Mask" Value="{StaticResource AccentBrush}"/>
            </Trigger>
        </Style.Triggers>
    </Style>

</ResourceDictionary>